179. Araxis Merge File Comparison Report

Produced by Araxis Merge on 2023-07-12 04:42:43 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

179.1 Files compared

#LocationFileLast Modified
1Porto v4.0.5/Theme Files/Porto Theme/app/code/Smartwave/Megamenu/view/frontend/templates/onepagecategorycategory_list.phtml2023-03-15 02:54:11 +0000
2Porto v4.0.6/Theme Files/Porto Theme/app/code/Smartwave/Megamenu/view/frontend/templates/onepagecategorycategory_list.phtml2023-03-15 02:54:11 +0000

179.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged1178
Changed00
Inserted00
Removed00

179.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

179.4 Active regular expressions

No regular expressions were active.

179.5 Comparison detail

1 <?php 1 <?php
2 /** 2 /**
3  * Copyright © 2018 Porto. All rights reserved. 3  * Copyright © 2018 Porto. All rights reserved.
4  */ 4  */
5  5 
6 ?> 6 ?>
7 <?php 7 <?php
8 /** 8 /**
9  * Top menu for store 9  * Top menu for store
10  * 10  *
11  * @see \Smartwave\Megamenu\Block\Topmenu 11  * @see \Smartwave\Megamenu\Block\Topmenu
12  */ 12  */
13 ?> 13 ?>
14 <?php 14 <?php
15     $_helper = $this->helper('Smartwave\Megamenu\Helper\Data'); 15     $_helper = $this->helper('Smartwave\Megamenu\Helper\Data');
16     $_portohelper = $this->helper('Smartwave\Porto\Helper\Data'); 16     $_portohelper = $this->helper('Smartwave\Porto\Helper\Data');
17  17 
18     $categories = $_helper->getFirstLevelCategories(); 18     $categories = $_helper->getFirstLevelCategories();
19  19 
20     $custom_styles='<style type="text/css">'; 20     $custom_styles='<style type="text/css">';
21 ?> 21 ?>
22 <?php if($_portohelper->getConfig('porto_settings/general/layout') == "full_width" && $_portohelper->getConfig('porto_settings/general/category_list_on_left')): ?> 22 <?php if($_portohelper->getConfig('porto_settings/general/layout') == "full_width" && $_portohelper->getConfig('porto_settings/general/category_list_on_left')): ?>
23 <div class="onepage-cat category-list"> 23 <div class="onepage-cat category-list">
24     <ul> 24     <ul>
25     <?php 25     <?php
26         $i = 0; 26         $i = 0;
27         foreach($categories as $category) { 27         foreach($categories as $category) {
28             $cat_id = $category->getId(); 28             $cat_id = $category->getId();
29             $cat_model = $_helper->getCategoryModel($cat_id); 29             $cat_model = $_helper->getCategoryModel($cat_id);
30             if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) { 30             if($category->getIsActive() && !$cat_model->getData("sw_ocat_hide_this_item")) {
31                 $icon = '<em class="porto-icon-circle-empty"></em>'; 31                 $icon = '<em class="porto-icon-circle-empty"></em>';
32                 if($cat_icon_img=$cat_model->getData("sw_ocat_category_icon_image")) { 32                 if($cat_icon_img=$cat_model->getData("sw_ocat_category_icon_image")) {
33                     $icon = '<img src="'.'catalog/category/'.$cat_icon_img.'" alt=""/>'; 33                     $icon = '<img src="'.'catalog/category/'.$cat_icon_img.'" alt=""/>';
34                 } else if($cat_font_icon=$cat_model->getData("sw_ocat_category_font_icon")){ 34                 } else if($cat_font_icon=$cat_model->getData("sw_ocat_category_font_icon")){
35                     $icon = '<em class="'.$cat_font_icon.'"></em>'; 35                     $icon = '<em class="'.$cat_font_icon.'"></em>';
36                 } 36                 }
37                 if($hover_bg_color = $cat_model->getData("sw_ocat_category_hoverbgcolor")) 37                 if($hover_bg_color = $cat_model->getData("sw_ocat_category_hoverbgcolor"))
38                     $custom_styles .= '.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-left-color:'.$hover_bg_color.';}'; 38                     $custom_styles .= '.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-left-color:'.$hover_bg_color.';}';
39                     $custom_styles .= '.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-right-color:'.$hover_bg_color.';border-left: none;}'; 39                     $custom_styles .= '.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active{background-color:'.$hover_bg_color.';}.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"]:hover:after,.rtl .onepage-category .category-list > ul > li > a[data-cat="'.$cat_id.'"].active:after{border-right-color:'.$hover_bg_color.';border-left: none;}';
40                     $custom_styles .= '@media(min-width: 768px){.page-wrapper {padding-left: 80px;padding-right: 0;}.rtl .page-wrapper {padding-right: 80px;padding-left: 0;}header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;left: 80px !important;right: auto !important;}.rtl header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;right: 80px !important;left: auto !important;}}'; 40                     $custom_styles .= '@media(min-width: 768px){.page-wrapper {padding-left: 80px;padding-right: 0;}.rtl .page-wrapper {padding-right: 80px;padding-left: 0;}header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;left: 80px !important;right: auto !important;}.rtl header.page-header.sticky-header .header-main {width: calc(100% - 80px) !important;right: 80px !important;left: auto !important;}}';
41                 echo '<li data-index="'.$i.'"><a href="'.$cat_model->getUrl().'" data-cat="'.$cat_id.'">'.$icon.'<span>'.$category->getName().'</span></a></li>'; 41                 echo '<li data-index="'.$i.'"><a href="'.$cat_model->getUrl().'" data-cat="'.$cat_id.'">'.$icon.'<span>'.$category->getName().'</span></a></li>';
42                 $i++; 42                 $i++;
43             } 43             }
44         } 44         }
45     ?> 45     ?>
46     </ul> 46     </ul>
47     <?php 47     <?php
48         $custom_styles .= '</style>'; 48         $custom_styles .= '</style>';
49         echo $custom_styles; 49         echo $custom_styles;
50     ?> 50     ?>
51 </div> 51 </div>
52  52 
53 <script type="text/javascript"> 53 <script type="text/javascript">
54 require([ 54 require([
55     'jquery' 55     'jquery'
56 ], function ($) { 56 ], function ($) {
57     $(document).ready(function(){ 57     $(document).ready(function(){
58         $(".onepage-cat.category-list > ul > li > a").each(function(){ 58         $(".onepage-cat.category-list > ul > li > a").each(function(){
59             var href = $(this).attr("href"); 59             var href = $(this).attr("href");
60             if(href.indexOf(window.location.pathname) > -1) 60             if(href.indexOf(window.location.pathname) > -1)
61                 $(this).addClass("active"); 61                 $(this).addClass("active");
62         }); 62         });
63         $(".onepage-category .columns").css("min-height", $(".onepage-cat.category-list").height()); 63         $(".onepage-category .columns").css("min-height", $(".onepage-cat.category-list").height());
64         $(window).scroll(function(){ 64         $(window).scroll(function(){
65             if($(".onepage-cat.category-list > ul").outerHeight() < $(this).innerHeight()) { 65             if($(".onepage-cat.category-list > ul").outerHeight() < $(this).innerHeight()) {
66                 $(".onepage-cat.category-list > ul").removeClass("fixed-bottom"); 66                 $(".onepage-cat.category-list > ul").removeClass("fixed-bottom");
67                 if($(this).scrollTop() >= $(".onepage-cat.category-list").offset().top + 46) { 67                 if($(this).scrollTop() >= $(".onepage-cat.category-list").offset().top + 46) {
68                     $(".onepage-cat.category-list > ul").addClass("fixed-top"); 68                     $(".onepage-cat.category-list > ul").addClass("fixed-top");
69                 } else { 69                 } else {
70                     $(".onepage-cat.category-list > ul").removeClass("fixed-top"); 70                     $(".onepage-cat.category-list > ul").removeClass("fixed-top");
71                 } 71                 }
72             } else { 72             } else {
73                 $(".onepage-cat.category-list > ul").removeClass("fixed-top"); 73                 $(".onepage-cat.category-list > ul").removeClass("fixed-top");
74                 if($(this).scrollTop() >= $(".onepage-cat.category-list").offset().top + $(".onepage-cat.category-list > ul").height() + 46 - $(this).innerHeight()) { 74                 if($(this).scrollTop() >= $(".onepage-cat.category-list").offset().top + $(".onepage-cat.category-list > ul").height() + 46 - $(this).innerHeight()) {
75                     $(".onepage-cat.category-list > ul").addClass("fixed-bottom"); 75                     $(".onepage-cat.category-list > ul").addClass("fixed-bottom");
76                 } else { 76                 } else {
77                     $(".onepage-cat.category-list > ul").removeClass("fixed-bottom"); 77                     $(".onepage-cat.category-list > ul").removeClass("fixed-bottom");
78                 } 78                 }
79             } 79             }
80             if(($(".onepage-cat.category-list > ul").hasClass("fixed-bottom") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top)) || ($(".onepage-cat.category-list > ul").hasClass("fixed-top") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top) && ($(".onepage-cat.category-list > ul").offset().top + $(".onepage-cat.category-list > ul").outerHeight() >= $(".page-footer").offset().top) && ($(this).scrollTop() + $(".onepage-cat.category-list > ul").outerHeight() + 70 >= $(".page-footer").offset().top))) { 80             if(($(".onepage-cat.category-list > ul").hasClass("fixed-bottom") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top)) || ($(".onepage-cat.category-list > ul").hasClass("fixed-top") && ($(this).scrollTop() + $(window).innerHeight() >= $(".page-footer").offset().top) && ($(".onepage-cat.category-list > ul").offset().top + $(".onepage-cat.category-list > ul").outerHeight() >= $(".page-footer").offset().top) && ($(this).scrollTop() + $(".onepage-cat.category-list > ul").outerHeight() + 70 >= $(".page-footer").offset().top))) {
81                 $(".onepage-cat.category-list > ul").addClass("absolute-bottom"); 81                 $(".onepage-cat.category-list > ul").addClass("absolute-bottom");
82             } else { 82             } else {
83                 $(".onepage-cat.category-list > ul").removeClass("absolute-bottom"); 83                 $(".onepage-cat.category-list > ul").removeClass("absolute-bottom");
84             } 84             }
85         }); 85         });
86     }); 86     });
87 }); 87 });
88 </script> 88 </script>
89 <?php endif; ?> 89 <?php endif; ?>